/*
 * @lc app=leetcode.cn id=1550 lang=javascript
 *
 * [1550] 存在连续三个奇数的数组
 */

// @lc code=start
/**
 * @param {number[]} arr
 * @return {boolean}
 */
var threeConsecutiveOdds = function (arr) {
  let cur = 0;
  for (let num of arr) {
    if (num % 2 === 1) {
      if (++cur === 3) {
        return true;
      }
    } else {
      cur = 0;
    }
  }
  return false;
};
// @lc code=end

